home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / var / db / pkg / sys-devel / gettext-0.14.4 / gettext-0.14.4.ebuild < prev    next >
Encoding:
Text File  |  2005-07-26  |  3.5 KB  |  125 lines

  1. # Copyright 1999-2005 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: /var/cvsroot/gentoo-x86/sys-devel/gettext/gettext-0.14.4.ebuild,v 1.13 2005/06/30 03:55:15 kumba Exp $
  4.  
  5. inherit flag-o-matic eutils toolchain-funcs mono libtool elisp-common
  6.  
  7. DESCRIPTION="GNU locale utilities"
  8. HOMEPAGE="http://www.gnu.org/software/gettext/gettext.html"
  9. SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
  10.  
  11. LICENSE="GPL-2"
  12. SLOT="0"
  13. KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc-macos ppc64 s390 sh sparc x86"
  14. IUSE="emacs nls doc"
  15.  
  16. DEPEND="|| ( sys-libs/glibc dev-libs/libiconv )"
  17.  
  18. src_unpack() {
  19.     unpack ${A}
  20.     cd "${S}"
  21.  
  22.     epunt_cxx
  23.  
  24.     epatch "${FILESDIR}"/${PN}-0.14.1-lib-path-tests.patch #81628
  25.     # java sucks
  26.     epatch "${FILESDIR}"/${PN}-0.14.1-without_java.patch
  27.     epatch "${FILESDIR}"/${PN}-0.14.2-no-java-tests.patch
  28.     # Fix race, bug #85054
  29.     epatch "${FILESDIR}"/${PN}-0.14.2-fix-race.patch
  30.  
  31.     # bundled libtool seems to be broken so skip certain rpath tests
  32.     # http://lists.gnu.org/archive/html/bug-libtool/2005-03/msg00070.html
  33.     sed -i \
  34.         -e '2iexit 77' \
  35.         autoconf-lib-link/tests/rpath-3*[ef] || die "sed tests"
  36.  
  37.     # use Gentoo std docdir
  38.     sed -i \
  39.         -e "/^docdir=/s:=.*:=/usr/share/doc/${PF}:" \
  40.         gettext-runtime/configure \
  41.         gettext-tools/configure \
  42.         gettext-tools/examples/installpaths.in \
  43.         || die "sed docdir"
  44.  
  45.     if use ppc-macos ; then
  46.         glibtoolize
  47.         append-flags -bind_at_load
  48.     fi
  49. }
  50.  
  51. src_compile() {
  52.     local myconf=""
  53.     # Build with --without-included-gettext (on glibc systems)
  54.     if use elibc_glibc ; then
  55.         myconf="${myconf} --without-included-gettext $(use_enable nls)"
  56.     else
  57.         myconf="${myconf} --with-included-gettext --enable-nls"
  58.     fi
  59.     use emacs || export EMACS=no #93823
  60.     CXX=$(tc-getCC) \
  61.     econf \
  62.         --without-java \
  63.         ${myconf} \
  64.         || die
  65.     emake || die
  66. }
  67.  
  68. src_install() {
  69.     make install DESTDIR="${D}" || die "install failed"
  70.     use nls || rm -r "${D}"/usr/share/locale
  71.     dosym msgfmt /usr/bin/gmsgfmt #43435
  72.     dobin gettext-tools/misc/gettextize || die "gettextize"
  73.  
  74.     # remove stuff that glibc handles
  75.     if use elibc_glibc ; then
  76.         rm -f "${D}"/usr/include/libintl.h
  77.         rm -f "${D}"/usr/$(get_libdir)/libintl.*
  78.     fi
  79.     rm -f "${D}"/usr/share/locale/locale.alias
  80.  
  81.     # older gettext's sometimes installed libintl ...
  82.     # need to keep the linked version or the system
  83.     # could die (things like sed link against it :/)
  84.     if use ppc-macos; then
  85.         rm -f "${D}"/usr/lib/charset.alias
  86.         if [ -e "${ROOT}"/usr/$(get_libdir)/libintl.2.dylib ] ; then
  87.             cp -pPR ${ROOT}/usr/$(get_libdir)/libintl.2.dylib ${D}/usr/$(get_libdir)/
  88.             touch ${D}/usr/$(get_libdir)/libintl.2.dylib
  89.         fi
  90.     else
  91.         if [ -e "${ROOT}"/usr/$(get_libdir)/libintl.so.2 ] ; then
  92.             cp -a ${ROOT}/usr/$(get_libdir)/libintl.so.2* ${D}/usr/$(get_libdir)/
  93.             touch ${D}/usr/$(get_libdir)/libintl.so.2*
  94.         fi
  95.     fi
  96.  
  97.     if ! use doc ; then
  98.         rm -r "${D}"/usr/share/doc/${PF}/html
  99.         rm -r "${D}"/usr/share/doc/${PF}/{csharpdoc,examples,javadoc2,javadoc1}
  100.     fi
  101.     dohtml "${D}"/usr/share/doc/${PF}/*.html
  102.     rm -f "${D}"/usr/share/doc/${PF}/*.html
  103.  
  104.     # Remove emacs site-lisp stuff if 'emacs' is not in USE
  105.     if use emacs ; then
  106.         elisp-site-file-install "${FILESDIR}"/50po-mode-gentoo.el
  107.     else
  108.         rm -rf "${D}"/usr/share/emacs
  109.     fi
  110.  
  111.     dodoc AUTHORS BUGS ChangeLog DISCLAIM NEWS README* THANKS TODO
  112. }
  113.  
  114. pkg_postinst() {
  115.     use emacs && elisp-site-regen
  116.     ewarn "Any package that linked against the previous version"
  117.     ewarn "of gettext will have to be rebuilt."
  118.     ewarn "Please 'emerge gentoolkit' and run:"
  119.     ewarn "revdep-rebuild --soname libintl.so.2"
  120. }
  121.  
  122. pkg_postrm() {
  123.     use emacs && elisp-site-regen
  124. }
  125.